/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.isfd.domain;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.comac.ins.isfd.domain.bo.IsfdOperatorParameterConfigBo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 算子参数配置集合
 *
 * @author hxloongs
 * @date 2024-7-8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@AutoMapper(target = IsfdOperatorParameterConfigBo.class)
@CollectionName(value = "operator_parameter_config")
public class IsfdOperatorParameterConfig {

    @ID
    private String _id;

    @CollectionField("component")
    private String component;

    @CollectionField("field_id")
    private String fieldId;

    @CollectionField("field_type")
    private String fieldType;

    @CollectionField("label")
    private String label;

    @CollectionField("operator_ref_id")
    private String operatorRefId;

    @CollectionField("operator_name")
    private String operatorName;

    @CollectionField("path")
    private String path;

    @CollectionField(value = "sort_order")
    private String sortOrder;

    @CollectionField("text_list")
    private List<String> textList;

    @CollectionField("type")
    private String type;

    @CollectionField("value_type")
    private String valueType;

    @CollectionField("options")
    private List<Option> options;

    @CollectionField("title")
    private List<Title> title;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Data
    public static class Option {
        @CollectionField("label")
        private String label;
        @CollectionField("value")
        private String value;
    }

    @Data
    public static class Title {
        @CollectionField("column_id")
        private String columnId;
        @CollectionField("label")
        private String label;
        @CollectionField("type")
        private String type;
    }

    @CollectionField("custom_json_field")
    private String customJsonField;

    /**
     * 元数据管理id
     */
    @CollectionField("metadata_management_id")
    private String metadataManagementId;
}
